#include "scene2d.h"

Scene2D::Scene2D()
{
    drawer = new TreeDraw();
    tree0 = new TreeGen2D();
    tree0->genTree();
    shadowGrid = new Shadow2D();
    tree0->iterateShadowB(shadowGrid);
    spaceColTree = new SpaceCol2D();

}

Scene2D::Scene2D(Artistic * wg)
{
    drawer = new TreeDraw();
    tree0 = new TreeGen2D();
    tree0->genTree();
    shadowGrid = new Shadow2D();
    tree0->iterateShadowB(shadowGrid);
    spaceColTree = new SpaceCol2D();
    spaceColTree->m_widget = wg;
}

Scene2D::~Scene2D(){
    delete drawer;
    delete tree0;
    delete shadowGrid;
}

void Scene2D::draw(){

    //spaceColTree->drawMarkers();
    //spaceColTree->generateMarkers();
    shadowGrid->draw();
    drawer->drawTree(tree0);
}
